package com.sn.pw.dao.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlCharsetConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlEngineConstant;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import com.sn.pw.common.entity.BaseEntity;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@TableName("ship_order")
@TableComment("订单信息")
@TableCharset(MySqlCharsetConstant.UTF8MB4)
@TableEngine(MySqlEngineConstant.InnoDB)
@Data
public class ShipOrder extends BaseEntity {
    private static final long serialVersionUID = 1L;

    @TableField(value = "order_time")
    @ColumnType(MySqlTypeConstant.DATE)
    @ColumnComment("订单日期")
    private Date orderTime;

    @TableField(value = "release_time")
    @ColumnType(MySqlTypeConstant.DATE)
    @ColumnComment("发布日期")
    private Date releaseDate;

    @TableField(value = "expected_time")
    @ColumnType(MySqlTypeConstant.DATE)
    @ColumnComment("预计出货日期")
    private Date expectedTime;

    @TableField("shipping_order_number")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("出通单号")
    private String shippingOrderNumber;

    @TableField("order_number")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("订单号")
    private String orderNumber;

    @TableField("business_personnel")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("业务人员")
    private String businessPersonnel;

    @TableField("business_department")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("业务部门")
    private String businessDepartment;

    @TableField("consignee_id")
    @ColumnType(MySqlTypeConstant.BIGINT)
    @ColumnComment("收货人ID")
    private Long consigneeId;

    @TableField("consignee")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("收货人")
    private String consignee;

    @TableField("consignee_phone")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("收货人联系电话")
    private String phone;

    @TableField("consignee_address")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("收货地址")
    private String consigneeAddress;

    @TableField(value = "product_volume")
    @ColumnType(MySqlTypeConstant.DECIMAL)
    @ColumnComment("产品总体积")
    private BigDecimal productVolume;

    @TableField(value = "total_square")
    @ColumnType(MySqlTypeConstant.DECIMAL)
    @ColumnComment("总方数")
    private BigDecimal totalSquare;

    @TableField("remark")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("备注")
    private String remark;

    @TableField(value ="price")
    @ColumnType(value = MySqlTypeConstant.DECIMAL,decimalLength = 8,length = 20)
    @ColumnComment("阈值价格")
    private BigDecimal price;

    @TableField(value = "pickup_time")
    @ColumnType(MySqlTypeConstant.DATE)
    @ColumnComment("取货日期")
    private Date pickupTime;

    @TableField("pickup_address")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("取货地址")
    private String pickupAddress;

    @TableField("company_id")
    @ColumnType(MySqlTypeConstant.BIGINT)
    @ColumnComment("物流公司ID")
    private Long companyId;

    @TableField("company_user_id")
    @ColumnType(MySqlTypeConstant.BIGINT)
    @ColumnComment("物流公司人员ID")
    private Long companyUserId;

    @TableField("receipt_order_id")
    @ColumnType(MySqlTypeConstant.BIGINT)
    @ColumnComment("回执订单id")
    private Long receiptOrderId;

    /**
     * publish status 发布状态
     */
    @TableField("publish_status")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("发布状态 已发布:Published 未发布:Unpublished")
    private String publishStatus;
    /**
     *竞价状态
     */
    @TableField("bid_status")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("竞价状态 竞价中: Bidding  竞价成功: Success 竞价失败: Failed")
    private String bidStatus;

    /**
     * Shipping status 发货状态
     */

    @TableField("shipping_status")
    @ColumnType(MySqlTypeConstant.VARCHAR)
    @ColumnComment("竞价状态 待发货: Waiting 运输中: Transit 已到货: Arrived 已签收: Delivered")
    private String shippingStatus;
}
